<?php
class Settingmodel extends CI_Model{

public function __construct(){

        parent::__construct();
}

public function get_area($offset,$rows){
  $arr=array();
  $sql="select area_id from area";
  $query=$this->db->query($sql);
$arr['total']=$query->num_rows();

$sql="select * from area limit $offset,$rows";
  $query=$this->db->query($sql);
  if($query->num_rows()>0){
    $arr['rows']=$query->result_array();
  }else{
    $arr=0;
  }
  return $arr;
}

public function get_price($offset,$rows){
  $arr=array();
  $sql="select id from exprice";
  $query=$this->db->query($sql);
$arr['total']=$query->num_rows();

$sql="select * from exprice limit $offset,$rows";
  $query=$this->db->query($sql);
  if($query->num_rows()>0){
    $arr['rows']=$query->result_array();
  }else{
    $arr=0;
  }
  return $arr;
}


public function get_prices(){
  $sql="select * from exprice";
  $query=$this->db->query($sql);
  $num=$query->num_rows();
  if($num>0){
    $arr=$query->result_array();
  }else{
    $arr=0;
  }
  return $arr;
}




}


?>
